//
//  StdSet.cpp
//  CollectionTest
//
//  Created by Dusan Vujosevic on 2013-10-25.
//  Copyright (c) 2013 Suavetech. All rights reserved.
//

#include "StdUnorderedSet.h"

bool StdUnorderedSet::init()
{
	_set.clear();
	return true;
}

void StdUnorderedSet::reset()
{
	_set.clear();
}

void StdUnorderedSet::loadElements(const void* randBytes, size_t elemCount)
{
	elemType* randElem = (elemType*)randBytes;
	for(size_t u = 0; u < elemCount; u++)
		_set.insert(*randElem++);
}

bool StdUnorderedSet::findElement(elemType elem)
{
	myOSetIterator res = _set.find(elem);
	if(res != _set.end())
		return true;
	else
		return false;
}


